
const state = {
  audioData: [[]],
  showPoup: false,
  duoyinList: [],
  person: {
    name: 'zh-CN-YunxiNeural',
    avr: 'audio19',
    zh_name: '云熙'
  },
  pos: {
    row: 0,
    col: 0,
  },
  content: "",
  rate: 1.1,
  volume: 10,
  isPlay: false
}
const mutations = {
  SET_SHOW_POUP(state, type) {
    state.showPoup = type
  },
  SET_DUOYIN_LIST(state, list) {
    state.duoyinList = list
  },
  SET_PERSON(state, obj) {
    state.person = obj
  },
  SET_CONTENT(state, content) {
    state.content = content
  },
  SET_RATE(state, rate) {
    state.rate = rate
  },
  SET_VOLUME(state, volume) {
    state.volume = volume
  },
  SET_ISPLAY(state, isPlay) {
    state.isPlay = isPlay
  }
}
const actions = {
  setShowPoup({ commit }, type) {
    commit('SET_SHOW_POUP', type)
  },
  setDuoyinList({ commit }, list) {
    commit('SET_DUOYIN_LIST', list)
  },
  setPerson({ commit }, obj) {
    commit('SET_PERSON', obj)
  },
  setcontents({ commit }, con) {
    commit('SET_CONTENT', con)
  },
  setRate({ commit }, rate) {
    commit('SET_RATE', rate)
  },
  setVolume({ commit }, volume) {
    commit('SET_VOLUME', volume)
  },
  setIsPlay({ commit }, isPlay) {
    commit('SET_ISPLAY', isPlay)
  },
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}